package com.example.multipledatasourcesdemo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.multipledatasourcesdemo.dao.UserMapper;
import com.example.multipledatasourcesdemo.model.User;
import com.example.multipledatasourcesdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Zenan Chen
 * @date 2023/4/14 17:25
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> getUsers() {
        return userMapper.selectList(new QueryWrapper<>());
    }
}
